package com.system.common.dao.purview;

import com.system.common.entity.purview.Purview;
import com.system.common.entity.purview.PurviewExample;
import java.util.List;

import com.system.common.vo.purview.MenuVo;
import com.system.common.vo.purview.PurviewVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

@Mapper
public interface PurviewMapper {
    /**
     *
     * @mbg.generated 2020-03-02
     */
    long countByExample(PurviewExample example);

    /**
     *
     * @mbg.generated 2020-03-02
     */
    int deleteByExample(PurviewExample example);

    /**
     *
     * @mbg.generated 2020-03-02
     */
    int insert(Purview record);

    /**
     *
     * @mbg.generated 2020-03-02
     */
    int insertSelective(Purview record);

    /**
     *
     * @mbg.generated 2020-03-02
     */
    List<Purview> selectByExample(PurviewExample example);

    /**
     *
     * @mbg.generated 2020-03-02
     */
    int updateByExampleSelective(@Param("record") Purview record, @Param("example") PurviewExample example);

    /**
     *
     * @mbg.generated 2020-03-02
     */
    int updateByExample(@Param("record") Purview record, @Param("example") PurviewExample example);

    /**
     *  根据角色ID查询接口地址
     * @param roleIds
     * @return
     */
    List<PurviewVo> getPurviewByRoleIds(@Param("roleIds") List<Long> roleIds);

    List<MenuVo> selectChildren(@Param("pid") Long pid);

    /**
     *  根据角色ID 查询权限ID
     * @param roleId
     * @return
     */
    List<Long> selectPurIdByRoleId(@Param("roleId") Long roleId);

}